3.1 \(\int \frac{\cos ^4(x)}{a+a \csc (x)} \, dx\)

Optimal. Leaf size=44 \[ -\frac{x}{8 a}-\frac{\cos ^3(x)}{3 a}+\frac{\sin (x) \cos ^3(x)}{4 a}-\frac{\sin (x) \cos (x)}{8 a} \]

[Out]

-x/(8*a) - Cos[x]^3/(3*a) - (Cos[x]*Sin[x])/(8*a) + (Cos[x]^3*Sin[x])/(4*a)

________________________________________________________________________________________

Rubi [A]  time = 0.122476, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.538, Rules used = {3872, 2839, 2565, 30, 2568, 2635, 8} \[ -\frac{x}{8 a}-\frac{\cos ^3(x)}{3 a}+\frac{\sin (x) \cos ^3(x)}{4 a}-\frac{\sin (x) \cos (x)}{8 a} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^4/(a + a*Csc[x]),x]

[Out]

-x/(8*a) - Cos[x]^3/(3*a) - (Cos[x]*Sin[x])/(8*a) + (Cos[x]^3*Sin[x])/(4*a)

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rule 2839

Int[((cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.))/((a_) + (b_.)*sin[(e_.) + (f_
.)*(x_)]), x_Symbol] :> Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^n, x], x] - Dist[g^2/(b*d),
Int[(g*Cos[e + f*x])^(p - 2)*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2
 - b^2, 0]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2568

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> -Simp[(a*(b*Cos[e
+ f*x])^(n + 1)*(a*Sin[e + f*x])^(m - 1))/(b*f*(m + n)), x] + Dist[(a^2*(m - 1))/(m + n), Int[(b*Cos[e + f*x])
^n*(a*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, n}, x] && GtQ[m, 1] && NeQ[m + n, 0] && IntegersQ[2*
m, 2*n]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\cos ^4(x)}{a+a \csc (x)} \, dx &=\int \frac{\cos ^4(x) \sin (x)}{a+a \sin (x)} \, dx\\ &=\frac{\int \cos ^2(x) \sin (x) \, dx}{a}-\frac{\int \cos ^2(x) \sin ^2(x) \, dx}{a}\\ &=\frac{\cos ^3(x) \sin (x)}{4 a}-\frac{\int \cos ^2(x) \, dx}{4 a}-\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,\cos (x)\right )}{a}\\ &=-\frac{\cos ^3(x)}{3 a}-\frac{\cos (x) \sin (x)}{8 a}+\frac{\cos ^3(x) \sin (x)}{4 a}-\frac{\int 1 \, dx}{8 a}\\ &=-\frac{x}{8 a}-\frac{\cos ^3(x)}{3 a}-\frac{\cos (x) \sin (x)}{8 a}+\frac{\cos ^3(x) \sin (x)}{4 a}\\ \end{align*}

Mathematica [A]  time = 0.0424377, size = 40, normalized size = 0.91 \[ -\frac{x}{8 a}+\frac{\sin (4 x)}{32 a}-\frac{\cos (x)}{4 a}-\frac{\cos (3 x)}{12 a} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^4/(a + a*Csc[x]),x]

[Out]

-x/(8*a) - Cos[x]/(4*a) - Cos[3*x]/(12*a) + Sin[4*x]/(32*a)

________________________________________________________________________________________

Maple [B]  time = 0.057, size = 172, normalized size = 3.9 \begin{align*} -{\frac{1}{4\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{7} \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-2\,{\frac{ \left ( \tan \left ( x/2 \right ) \right ) ^{6}}{a \left ( \left ( \tan \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{4}}}+{\frac{7}{4\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{5} \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-2\,{\frac{ \left ( \tan \left ( x/2 \right ) \right ) ^{4}}{a \left ( \left ( \tan \left ( x/2 \right ) \right ) ^{2}+1 \right ) ^{4}}}-{\frac{7}{4\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{3} \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-{\frac{2}{3\,a} \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2} \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}+{\frac{1}{4\,a}\tan \left ({\frac{x}{2}} \right ) \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-{\frac{2}{3\,a} \left ( \left ( \tan \left ({\frac{x}{2}} \right ) \right ) ^{2}+1 \right ) ^{-4}}-{\frac{1}{4\,a}\arctan \left ( \tan \left ({\frac{x}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^4/(a+a*csc(x)),x)

[Out]

-1/4/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)^7-2/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)^6+7/4/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)
^5-2/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)^4-7/4/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)^3-2/3/a/(tan(1/2*x)^2+1)^4*tan(1/2*
x)^2+1/4/a/(tan(1/2*x)^2+1)^4*tan(1/2*x)-2/3/a/(tan(1/2*x)^2+1)^4-1/4/a*arctan(tan(1/2*x))

________________________________________________________________________________________

Maxima [B]  time = 1.44389, size = 212, normalized size = 4.82 \begin{align*} \frac{\frac{3 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac{8 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac{21 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - \frac{24 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac{21 \, \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}} - \frac{24 \, \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} - \frac{3 \, \sin \left (x\right )^{7}}{{\left (\cos \left (x\right ) + 1\right )}^{7}} - 8}{12 \,{\left (a + \frac{4 \, a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac{6 \, a \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac{4 \, a \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + \frac{a \sin \left (x\right )^{8}}{{\left (\cos \left (x\right ) + 1\right )}^{8}}\right )}} - \frac{\arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{4 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^4/(a+a*csc(x)),x, algorithm="maxima")

[Out]

1/12*(3*sin(x)/(cos(x) + 1) - 8*sin(x)^2/(cos(x) + 1)^2 - 21*sin(x)^3/(cos(x) + 1)^3 - 24*sin(x)^4/(cos(x) + 1
)^4 + 21*sin(x)^5/(cos(x) + 1)^5 - 24*sin(x)^6/(cos(x) + 1)^6 - 3*sin(x)^7/(cos(x) + 1)^7 - 8)/(a + 4*a*sin(x)
^2/(cos(x) + 1)^2 + 6*a*sin(x)^4/(cos(x) + 1)^4 + 4*a*sin(x)^6/(cos(x) + 1)^6 + a*sin(x)^8/(cos(x) + 1)^8) - 1
/4*arctan(sin(x)/(cos(x) + 1))/a

________________________________________________________________________________________

Fricas [A]  time = 0.476342, size = 82, normalized size = 1.86 \begin{align*} -\frac{8 \, \cos \left (x\right )^{3} - 3 \,{\left (2 \, \cos \left (x\right )^{3} - \cos \left (x\right )\right )} \sin \left (x\right ) + 3 \, x}{24 \, a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^4/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/24*(8*cos(x)^3 - 3*(2*cos(x)^3 - cos(x))*sin(x) + 3*x)/a

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\cos ^{4}{\left (x \right )}}{\csc{\left (x \right )} + 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**4/(a+a*csc(x)),x)

[Out]

Integral(cos(x)**4/(csc(x) + 1), x)/a

________________________________________________________________________________________

Giac [B]  time = 1.29467, size = 105, normalized size = 2.39 \begin{align*} -\frac{x}{8 \, a} - \frac{3 \, \tan \left (\frac{1}{2} \, x\right )^{7} + 24 \, \tan \left (\frac{1}{2} \, x\right )^{6} - 21 \, \tan \left (\frac{1}{2} \, x\right )^{5} + 24 \, \tan \left (\frac{1}{2} \, x\right )^{4} + 21 \, \tan \left (\frac{1}{2} \, x\right )^{3} + 8 \, \tan \left (\frac{1}{2} \, x\right )^{2} - 3 \, \tan \left (\frac{1}{2} \, x\right ) + 8}{12 \,{\left (\tan \left (\frac{1}{2} \, x\right )^{2} + 1\right )}^{4} a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^4/(a+a*csc(x)),x, algorithm="giac")

[Out]

-1/8*x/a - 1/12*(3*tan(1/2*x)^7 + 24*tan(1/2*x)^6 - 21*tan(1/2*x)^5 + 24*tan(1/2*x)^4 + 21*tan(1/2*x)^3 + 8*ta
n(1/2*x)^2 - 3*tan(1/2*x) + 8)/((tan(1/2*x)^2 + 1)^4*a)